import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import ElementUI from 'element-ui'
import './styles.scss'
let echarts = require('echarts')


Vue.use(ElementUI)
Vue.prototype.$echarts = echarts
Vue.config.productionTip = false;

router.beforeEach((to, from, next) => {
  if (to.path === '/login') return next();
  const tockenstr = window.sessionStorage.getItem('tockenstr')
  if (!tockenstr) return next('/login')
  next();
})

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount('#app');
